package com.skyworth.userapi.api;

import com.skyworth.userapi.pojo.dto.accountinfo.req.*;
import com.skyworth.userapi.pojo.dto.accountinfo.res.*;
import com.skyworth.core.pojo.dto.PageResDTO;
import com.skyworth.core.pojo.dto.ResDTO;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * <p>
 * 代理商员工表 模块API
 * </p>
 *
 * @author wuxj
 * @since 2020-04-23
 */
public interface AccountInfoApi  {

    /**
    * 查询分页数据
    */
    @PostMapping(value = "/accountInfo/list", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     ResDTO<PageResDTO<AccountInfoListResDTO>> list(@RequestBody AccountInfoListReqDTO accountInfoListReqDTO);

    /**
    * 根据id查询
    */
    @PostMapping(value = "/accountInfo/get/{id}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     ResDTO<AccountInfoGetResDTO> get(@PathVariable("id") Long id);

    /**
    * 新增
    */
    @PostMapping(value = "/accountInfo/add", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     ResDTO<Void> add(@RequestBody AccountInfoAddReqDTO accountInfoAddReqDTO);

    /**
    * 删除
    */
    @PostMapping(value = "/accountInfo/del/{ids}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     ResDTO<Void> delete(@PathVariable("ids") List<Long> ids);

    /**
    * 修改
    */
    @PostMapping(value = "/accountInfo/update", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
     ResDTO<Void> update(@RequestBody AccountInfoUpdateReqDTO accountInfoUpdateReqDTO);
}